﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public enum HMMPosition
    {
        BEGIN   =  ('b'), // HMM is at the beginning position of the word
        END     =  ('e'), // HMM is at the end position of the word
        SINGLE   = ('s'), // HMM is at the beginning and the end of the word
        INTERNAL = ('i'), // HMM is completely internal to the word
        UNDEFINED= ('-')// HMM is at an undefined position in the word
    }
    

    //private static final HMMPosition[] posByRep;
    //static {
    //    int maxChar = 0;
    //    for (HMMPosition pos : values()) // determine max char to use as index
    //        if (pos.rep.charAt(0) > maxChar)
    //            maxChar = pos.rep.charAt(0);
    //    posByRep = new HMMPosition[maxChar + 1];
    //    for (HMMPosition pos : values()) // cache HMMPositions according to rep
    //        posByRep[pos.rep.charAt(0)] = pos;
    //}

    //private final String rep;

    ///**
    ///// Looks up an HMMPosition based upon its representation
    // *
    ///// @param rep the string representation
    ///// @return the HMMPosition represented by rep or null if not found
    // */
    //private HMMPosition(char rep) {
    //    this.rep = String.valueOf(rep);
    //}

    ///**
    ///// Looks up an HMMPosition based upon its representation
    // *
    ///// @param rep the string representation
    ///// @return the HMMPosition represented by rep or null if not found
    // */
    //public static HMMPosition lookup(String rep) {
    //    return rep == null || rep.isEmpty() ? null : posByRep[rep.charAt(0)];
    //}

    ///**
    ///// Determines if this position is an end word position
    // *
    ///// @return true if this is an end of word position
    // */
    //public boolean isWordEnd() {
    //    return this == SINGLE || this == END;
    //}

    ///**
    ///// Determines if this position is word beginning position
    // *
    ///// @return true if this is a word beginning position
    // */
    //public boolean isWordBeginning() {
    //    return this == SINGLE || this == BEGIN;
    //}

    ///**
    ///// Returns a string representation of this object
    // *
    ///// @return the string representation
    // */
    //override
    //public String toString() {
    //    return rep;
    //}

    //}
}
